#pragma once
#include "interfaces.h"
/********************************************************************************/
//Asset Data:
//Interface for parsed(imported) data which is ready to use.
//It is actually a tree structure where each assetdata can be parent and child.
//Each asset data may be container for different type of information;
/********************************************************************************/

class AssetData : public IAssetData
{
public:
	AssetData() { m_pParent = AssetDataPtr(); }
	~AssetData() {}

	virtual const AssetType & GetAssetType();
	virtual AssetDataPtr GetParent();
	virtual const RE_String GetName();

	virtual bool Restore(); // basically, making sure the asset data is loaded and ready for use
	virtual bool RestoreChildren();
	virtual bool Release(); // releasing the dynamic part of the asset
	virtual void RemoveChildren(); // remove asset + all childs
	virtual AssetDataList GetChildrenByType(const AssetType & type);

	virtual void SetParent(AssetDataPtr parent);
	virtual void AddChild(AssetDataPtr child);
	virtual AssetDataPtr TraceParent(const AssetType & type);

	RE_String m_name;
	AssetDataList m_Children;
	AssetDataWeakPtr m_pParent;
};